#ifndef FRIENDSERVICE_H
#define FRIENDSERVICE_H

#include <QObject>
#include <memory>
#include "protocol.h"
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonDocument>
#include <QMap>
#include <QList>
#include <QVariant>
class FriendService : public QObject
{
    Q_OBJECT
public:
    explicit FriendService(QObject *parent = nullptr);

    void RecvAddFriendRequest(std::shared_ptr<PDU> recvBag);

    void RecvFriendInformRespond(std::shared_ptr<PDU> recvBag);

    void RecvAddFriendRespond(std::shared_ptr<PDU> recvBag);

    void RecvFriendListRespond(std::shared_ptr<PDU> recvBag);

signals:
    void EmitAddFriendInform(QJsonObject);//好友添加

    void EmitFriendInformList(QList<QMap<QString,QVariant>> InfoList);

    void GlobalNoticeAddFriendStatus(QJsonObject);

    void EmitFriendList(QJsonObject);

};

#endif // FRIENDSERVICE_H
